/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package systole.processor.filters;

/**
 *
 * @author user
 */
public class FilterConfiguration implements Cloneable {

    private int order;
    private double atten;
    private double ripple;
    private double trband;
    private double[] bands;
    private double[] desired;
    private double[] weights;

    /**
     * 
     */
    public FilterConfiguration(){
    	super();
    }

    /**
     * @param order
     * @param atten
     * @param ripple
     * @param trband
     * @param bands
     * @param desired
     * @param weights
     */
    public FilterConfiguration(int order, double atten, double ripple, double trband, double[] bands, double[] desired, double[] weights){
        this.order = order;
        this.atten = atten;
        this.ripple = ripple;
        this.trband = trband;
        this.bands = bands;
        this.desired = desired;
        this.weights = weights;
    }


    /**
     * @return the order
     */
    public int getOrder() {   return this.order;    }

    /**
     * @param order the order to set
     */
    public void setOrder(int order) {  this.order = order;    }

    /**
     * @return the atten
     */
    public double getAtten() {  return this.atten;   }

    /**
     * @param atten the atten to set
     */
    public void setAtten(double atten) {  this.atten = atten;   }

    /**
     * @return the ripple
     */
    public double getRipple() {   return this.ripple;  }

    /**
     * @param ripple the ripple to set
     */
    public void setRipple(double ripple) {  this.ripple = ripple;  }

    /**
     * @return the trband
     */
    public double getTrband() {  return this.trband; }

    /**
     * @param trband the trband to set
     */
    public void setTrband(double trband) {  this.trband = trband; }

    /**
     * @return the bands
     */
    public double[] getBands() {   return this.bands; }

    /**
     * @param bands the bands to set
     */
    public void setBands(double[] bands) {  this.bands = bands;  }

    /**
     * @return the desired
     */
    public double[] getDesired() { return this.desired; }

    /**
     * @param desired the desired to set
     */
    public void setDesired(double[] desired) {  this.desired = desired; }

    /**
     * @return the weights
     */
    public double[] getWeights() {  return this.weights; }

    /**
     * @param weights the weights to set
     */
    public void setWeights(double[] weights) {  this.weights = weights; }


    @Override
    public Object clone(){

        FilterConfiguration configCopy = null;
        
        try{
            configCopy = (FilterConfiguration)super.clone();
            configCopy.setOrder(this.order);
            configCopy.setTrband(this.trband);
            configCopy.setRipple(this.ripple);
            configCopy.setAtten(this.atten);
            configCopy.setBands(this.bands);
            configCopy.setDesired(this.desired);
            configCopy.setWeights(this.weights);
        }catch(CloneNotSupportedException ex){
            ex.printStackTrace();
        }


        return configCopy;
    }

}
